class Hello{
    firstName : string;
    lastName : string;

    curDate: Date;

    constructor(fname : string,lname : string){
        this.firstName = fname;
        this.lastName = lname;
    }

    syaHi(){
        this.curDate = new Date();
        return "你好 ： " + this.firstName + "," + this.lastName+">>"+this.curDate;
    }

}

var user = new Hello("张","三");

document.body.innerHTML = user.syaHi();
